package interfaces;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JButton;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;

public class MyButton extends JButton //class for a special view of JButton
{
 private MyButton tmpButton;	
 public MyButton(String text)
 {
  super(text);
  this.setBackground(Color.white);
  this.setOpaque(false);
  this.setForeground(Color.blue);
  this.setFont(new Font("Verdana", Font.BOLD, 22));
  this.setBorder(new EmptyBorder(1,1,1,1));
  tmpButton=this;
  addMouseListener(new MouseListener(){

		@Override
		public void mouseClicked(MouseEvent arg0) {
			// TODO Auto-generated method stub
			
		}

		@Override
		public void mouseEntered(MouseEvent arg0) 
		{
			// TODO Auto-generated method stub
		 tmpButton.setBorder(new LineBorder(Color.red));	
		 tmpButton.setFont(new Font("Verdana", Font.ITALIC, 27));
		}

		@Override
		public void mouseExited(MouseEvent arg0) {
			// TODO Auto-generated method stub
		 tmpButton.setBorder(new EmptyBorder(1,1,1,1));	
		 tmpButton.setFont(new Font("Verdana", Font.BOLD, 22));
		}

		@Override
		public void mousePressed(MouseEvent arg0) {
			// TODO Auto-generated method stub
			
		}

		@Override
		public void mouseReleased(MouseEvent arg0) {
			// TODO Auto-generated method stub
			
		}
		
	});
 }
}
